package com.toubutu.audio.admin.dto;

import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.toubutu.audio.entity.Video;
import com.toubutu.audio.valid.ValidGroup;
import com.toubutu.common.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.util.List;

/**
 * @author Zhu PengJie
 * @date 2024/1/17
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class VideoDto extends BaseDto<Video> {

    @ApiModelProperty("视频编码")
    @NotBlank(message = "视频编码不能为空!",groups = {ValidGroup.Update.class})
    private String videoCode;
    @NotBlank(message = "视频名称不能为空!",groups = {ValidGroup.Add.class,ValidGroup.Update.class})
    @ApiModelProperty("视频名称")
    private String videoName;

    @ApiModelProperty("视频描述")
    @NotBlank(message = "视频描述不能为空!",groups = {ValidGroup.Add.class,ValidGroup.Update.class})
    private String videoDesc;

    @ApiModelProperty("上映时间")
    @NotNull(message = "上映时间不能为空!",groups = {ValidGroup.Add.class,ValidGroup.Update.class})
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate releaseTime;

    @ApiModelProperty("评分")
    private Double rate;

    @ApiModelProperty("是否多级")
    private Integer isMultiple;
    @ApiModelProperty("序号")
    private Integer seq;


    @ApiModelProperty("视频地址")
    private String sourceSrc;
    @ApiModelProperty("演员")
    @NotBlank(message = "演员信息不能为空!",groups = {ValidGroup.Add.class,ValidGroup.Update.class})
    private String actor;
    @ApiModelProperty("导演")
    @NotBlank(message = "导演信息不能为空!",groups = {ValidGroup.Add.class,ValidGroup.Update.class})
    private String director;
    @ApiModelProperty("视频分类id")
    @NotNull(message = "视频分类id不能为空!",groups = {ValidGroup.Add.class,ValidGroup.Update.class})
    private Integer categoryId;

    @ApiModelProperty("地区")
    private String area;
    @ApiModelProperty("语言")
    private String language;

    @ApiModelProperty("视频标签")
    @NotEmpty(message = "视频标签不能为空",groups = {ValidGroup.Add.class,ValidGroup.Update.class})
    private List<String> tagList;
 }
